package com.msmall.community.team.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.msmall.base.model.BaseObject;

@Entity
@Table(name="team_user")
public class TeamUser extends BaseObject{
	
	private static final long serialVersionUID = 4228127265720778422L;
	
	public static final Integer STATUS_NORMAL = 1;
	public static final Integer STATUS_APPLYING = 2;
	public static final Integer STATUS_REJECT = 3;
	public static final Integer STATUS_INVITE = 4;
	public static final Integer STATUS_FORBIDDEN = 9;

	public static final Integer POSITION_CHAIRMAN = 1;
	public static final Integer POSITION_VICE_CHAIRMAN = 2;
	public static final Integer POSITION_NORMAL = 3;
	
	@Id
	@Column(name="team_user_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long tuid;
	
	@Column(name="userid")
	private Long userid;
	
	@Column(name="teamid")
	private Long teamid;
	
	//职位 1组长(创建者)  2副组长  3普通成员
	@Column(name="position")
	private Integer position;
	//状态 1正常 2申请中 3拒绝  4受邀请 9被屏蔽;如果用户的申请被拒绝了，那么删除记录
	@Column(name="status")
	private Integer status;
	//申请时的申请原因
	@Column(name="apply_paper")
	private String applyPaper;
	
	//用户给此组的备注名称
	@Column(name="team_nickname")
	private String teamNickname;
	
	//用户给此组的曾经所有使用过的备注名称，用,分割
	@Column(name="team_nickname_history")
	private String teamNicknameHistory;
	
	//用户在此组的昵称 如果为NULL
	@Column(name="nickname")
	private String nickname;
	
	//用户在此组的曾经所有使用过的昵称，用,分割
	@Column(name="nickname_history")
	private String nicknameHistory;
	
	//创建日期
	@Column(name="create_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	
	public Long getTuid() {
		return tuid;
	}
	public void setTuid(Long tuid) {
		this.tuid = tuid;
	}
	public Long getUserid() {
		return userid;
	}
	public void setUserid(Long userid) {
		this.userid = userid;
	}
	public Long getTeamid() {
		return teamid;
	}
	public void setTeamid(Long teamid) {
		this.teamid = teamid;
	}
	public Integer getPosition() {
		return position;
	}
	public void setPosition(Integer position) {
		this.position = position;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getApplyPaper() {
		return applyPaper;
	}
	public void setApplyPaper(String applyPaper) {
		this.applyPaper = applyPaper;
	}
	public String getTeamNickname() {
		return teamNickname;
	}
	public void setTeamNickname(String teamNickname) {
		this.teamNickname = teamNickname;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getTeamNicknameHistory() {
		return teamNicknameHistory;
	}
	public void setTeamNicknameHistory(String teamNicknameHistory) {
		this.teamNicknameHistory = teamNicknameHistory;
	}
	public String getNicknameHistory() {
		return nicknameHistory;
	}
	public void setNicknameHistory(String nicknameHistory) {
		this.nicknameHistory = nicknameHistory;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
}
